home *** CD-ROM | disk | FTP | other *** search
- Path: news.gate.net!news-adm
- From: Ross Mcintosh <travismc@gate.net>
- Newsgroups: comp.lang.c++
- Subject: Inline Assembler Error
- Date: Wed, 03 Apr 1996 16:06:49 -0800
- Organization: CyberGate, Inc.
- Message-ID: <31631299.116A@gate.net>
- NNTP-Posting-Host: tpafl2-50.gate.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (Win95; I)
-
- I'm a recent convert from Pascal and I'm having trouble using Borland C++'s inline assembler. I keep getting
- a Undefined Lable "_Start" in function HLine. Here's the code I'm having trouble with
-
- void HLine(int x1, int x2, int y, inc col)
- {
- asm {
- mov ax, VGA_Screen /* VGA_Screen is the screen offset in mode 13h or 0xA000h */
- mov es, ax
- mov ax, y
- mov di, ax
- shl ax, 8
- shl di, 6
- add di, ax
- add di, x1
- mov al, col
- mov ah, al
- mov cx, x2
- sub cx, x1
- shr cx, 1
- jnc _Start
- stosb
-
- _Start:
- rep stosw
- }
- };
-
- If someone could tell me what I'm doing wrong I would be most grateful.
-